package com.study.thread;

public class MyThreadDemo {
    public static void main(String[] args) {

        MyThread t1 = new MyThread("线程1");
        //实现Runable接口的线程
//        MyThread t2 = new MyThread("线程2");
//        MyThread t3 = new MyThread("线程3");
//        new Thread(t1).start();
//        new Thread(t2).start();
//        new Thread(t3).start();
        //继承Thread类的线程
            new MyThread2("线程1").start();
            new MyThread2("线程2").start();
            new MyThread2("线程3").start();
    }
}
